Conversation
|
When a fuzz factor of 3 goes wrong, boy oh boy does it go really wrong. :lolsob: |
There was a problem hiding this comment.
Pull request overview
This PR changes the interdiff fuzzy matching configuration from an explicit fuzz factor of 3 to the default fuzz factor of 2. The change aims to improve the reviewability of interdiff output when comparing backported kernel commits with their upstream counterparts, particularly when patch application fails and generates rejected hunks.
Key Changes:
- Modified the interdiff command to use
--fuzzy(default fuzz factor of 2) instead of--fuzzy=3
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -89,7 +89,7 @@ def run_interdiff(repo, backport_sha, upstream_sha, interdiff_path): | |||
| up_path = up.name | |||
|
|
|||
There was a problem hiding this comment.
[nitpick] The change from --fuzzy=3 to --fuzzy relies on the default fuzz factor being 2. Consider adding a comment explaining this default behavior for future maintainability, e.g.:
# Use default fuzz factor of 2 for better patch application results
[interdiff_path, "--fuzzy", bp_path, up_path]This would make the intent clearer and document the assumed default value.
| # Use default fuzz factor of 2 for better patch application results |
When a fuzz factor of 3 results in an incorrect patch application, the final interdiff output is harder to review than when the fuzz factor is 2. This is especially the case because it's common for rejected hunks from both files to appear back-to-back, making the rejected hunks easy to review. Turn down the fuzz factor to the default of 2 to avoid results that are very confusing.
0f5d99f to
9e802b4
Compare
When a fuzz factor of 3 results in an incorrect patch application, the final interdiff output is harder to review than when the fuzz factor is 2. This is especially the case because it's common for rejected hunks from both files to appear back-to-back, making the rejected hunks easy to review.
Turn down the fuzz factor to the default of 2 to avoid results that are very confusing.